package main;

import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;

public class TabMaintenance {
	static void set(Shell shell, TabFolder tabFolder) {
		TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
		tabItem.setText("Maintenance");
		
		Composite composite_3 = new Composite(tabFolder, SWT.NONE);
		tabItem.setControl(composite_3);
		
		Button rereadTemplateButton = new Button(composite_3, SWT.NONE);
		rereadTemplateButton.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
				try {
					rereadTemplatefile(shell);
				} catch (Exception e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}
			}
		});
		rereadTemplateButton.setBounds(22, 22, 127, 25);
		rereadTemplateButton.setText("Reread Template File");
	}
	
	//Reread DB Handling
	/**
	 * Update entry in DB for the current airfield & update the LP informations
	 * @param shell
	 * @throws Exception 
	 */
	private static void rereadTemplatefile (Shell shell) throws Exception {
		
	}
}
